We're going to take a look at perhaps one of my favorite functions built into Microsoft Excel.
We're going to talk about the IF function.
Now the IF function isn't just exclusive to Microsoft Excel.
If you get into any programming language you're going to jump into ifs.
Now here's an example of an F and every day examples something that you could probably apply to this
morning when you woke up.
Think about it.
What woke you up this morning.
More than likely you probably had an alarm clock that went off the alarm clock was set.
It had a very specific condition that it was looking for.
For me that said hey when it becomes 7:00 in the morning I should ring a bell and wake this person up
.
If it's not 7 o'clock yet then I'll go ahead and wait and wait and wait until it becomes 7:00 o'clock
.
This is essentially an if it's a condition.
If this is true if 7 o'clock is the current time then I'm going to do something.
If it's not 7 o'clock then I'm going to do something else like I'm going to wait well with bring this
into the world of excel within that function very similar concept.
Take a look inside this example file.
I've got some totals here.
These are the totals for the four weeks of December 2015 for these five different salespeople.
And what I'd like to know is whether or not these salespeople their totals met the monthly goal was
the goal met.
Well I want to compare these individual totals against this monthly goal total.
That's an.
Well was the goal met.
If it's true over 36000 that's greater than 34000.
So they met the goal.
Then I want to put a big old yes right here inside of h 5 for H.
James Right.
Well that doesn't make it 31000 compare that against 34 oops sorry that K. Dunn didn't make it.
So no these are conditions we're looking for.
If this is true if the total is greater than this or equal or less than do one thing if it's not then
do something else.
This is your function and I love this function.
This is just one example here.
But any time that you're inside of Excel and you've got to make a decision based off of some condition
and you probably do this a lot maybe you're comparing dates are you comparing numbers against each other
.
Whatever it is get the if function to do it for you.
So take a look this is how you work with the function now to set this up.
I'm actually going to name this I to sell.
So I'm in a slight Aitu.
I'll go in the name box in the corner.
And rather than calling it Aitu I'm going to call this monthly bill.
Let's make sure I spell it right monthly goal.
And you might recall if you took part in the earlier video no spaces inside of your name ranges I have
my enter key.
Make sure that it accepts that.
And I now name that to sell as monthly goal.
All right.
So I'm going to do the first one here was the gold net that I mean to do it for H.
James.
So I click inside a cell h 5 and then get up to my formulas tab the top of my screen.
I'm going to go into the logical folder and I'm going to find if this opens up my function's argument
when no where the IF function has three arguments.
Three things that it needs to know in order to perform the f function.
So the first thing.
This is our test or our condition this is what we're looking for.
So for my logical test I want to know if f 5 or click in their cell This is H James is total f f five
is greater than or equal to.
And I'm just typing those in I too.
Or what did I call it monthly goal.
So there's a logical test.
This is what are conditions looking for.
If EF 5 is greater than or equal to monthly goal.
Okay great.
Now I get to designate what's going to happen if that's true and what's going to happen if that's false
.
Well for me I'm going make this really simple.
I'll say if it's true then I'm going to put a big old yes in there as soon as I hit my tab key here
you'll see that Excel put puts quotes around it.
Now if it doesn't do it you do want to put quotes around that it's a text value.
It's expected that any text by use will be surrounded by quotes.
Now that's the true part.
Yes you made it OK if you didn't make it then I'm going to say no when a bummer.
I hit my Ted Key.
And once again Excel puts the quotes in there.
So three little things.
It's a superpowerful function get a condition.
What are you looking for.
Well that condition will be evaluated and then one of two things will take place.
Yes and no or true and false and that's it.
OK.
And the first person no big surprise here H James made the call.
Thirty six thousand.
Yes indeed is greater than 34.
Now I need to do this for the rest of them.
Try this out yourself.
Open up the exercise while jump in and utilize it if to complete the option for was the goal met specify
the condition and tell it when you wanted to do.
Whether it's true or false.
And really quickly what you do one of them I can then use the autofill that little box in the corner
drag that down left click and drag.
And I'm done.
Yes no no yes yes.
So try it out.
Confirm that the month the goal was met or not met.
For each of these employees and then we'll carry on to the next function.